import request from "@/utils/request.js"

/**
 * 上传头像
 * @param data
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export const uploadAvatar = (data) => {
  return request.post('/user/common/upload', data,
    {
      headers:
        {
          'Content-Type': 'multipart/form - data'
        }
    })
}

/**
 * 上传封面
 * @param data
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export const uploadCover = (data) => {
  return request.post('/user/common/upload/cover', data,
    {
      headers:
        {
          'Content-Type': 'multipart/form - data'
        }
    })
}
